package com.merlin.security.demo.web.validator;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

@Target({ElementType.METHOD,ElementType.FIELD})  
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy =IdCardValidator.class)
public @interface IsIdCard {
	
	/**
	 * message提供校验失败后的错误消息
	 * @return
	 */
	String message();

	/**
	 * groups分组验证
	 * @return
	 */
    Class<?>[] groups() default { };

    
    /**
     * payload承载元数据
     * @return
     */
    Class<? extends Payload>[] payload() default { };

}
